package net.csdra.article.domain.meta;

import java.util.Arrays;
import java.util.List;

/**
 * Created by msf on 2018/2/2.
 */
public class MetaType {
    public static final TextMeta text = new TextMeta("text", "文本", null);
    public static final TextMeta alphanum = new TextMeta("alphanum", "字母和数字", "[^a-z0-9]+");
    public static final NumberMeta number = new NumberMeta("数字", "[^\\d-.]+|\\d+-|^\\-*\\.|(\\d*\\.){2,}|(\\d*\\-){2,}");
    public static final DateMeta date = new DateMeta("日期", ".*");
    public static final DateTimeMeta datetime = new DateTimeMeta("日期时间", ".*");
    public static final TimeMeta time = new TimeMeta("时间", ".*");
    public static final TextMeta phone = new TextMeta("phone", "电话", "^-|[^0-9-]+");
    public static final TextMeta email = new TextMeta("email", "电子邮箱", "^[^a-z0-9]|[^a-z0-9@.]+");
    public static final TextMeta longText = new TextMeta("longText", "长文本", null);
    public static final MediaMeta image = new MediaMeta("image", "图片", null);
    public static final MediaMeta album = new MediaMeta("album", "相册", null);
    public static final MediaMeta video = new MediaMeta("video", "视频", null);
    public static final MediaMeta audio = new MediaMeta("audio", "音频", null);
    public static final CRSMeta check = new CRSMeta("check", "多选", null);
    public static final CRSMeta radio = new CRSMeta("radio", "单选", null);
    public static final CRSMeta select = new CRSMeta("select", "下拉", null);
    public static final List<MetaBase> metaTypes = Arrays.asList(text, alphanum, number, date, datetime, time, phone, email, longText, image, album, video, audio, check, radio, select);

}
